package com.csun.cmny.provider.model.dto.volunteer;

import com.csun.cmny.provider.validator.UacVolunteerAddValidator;
import com.csun.cmny.provider.validator.UacVolunteerEditValidator;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-05-17 14:51
 * @Description: the class volunteer dto
 */
@Data
public class VolunteerDto implements Serializable {

    private static final long serialVersionUID = -1471235127383613212L;

    /**
     * id
     */
    @NotNull(message = "{volunteer.id.null}",
            groups = {UacVolunteerEditValidator.class})
    private Long id;

    /**
     * 姓名
     */
    @NotNull(message = "{volunteer.user.name.null}",
            groups = {UacVolunteerAddValidator.class})
    @NotEmpty(message = "{volunteer.user.name.null}",
            groups = {UacVolunteerAddValidator.class})
    private String userName;

    /**
     * 民族
     */
    @NotNull(message = "{volunteer.nation.null}",
            groups = {UacVolunteerAddValidator.class})
    @NotEmpty(message = "{volunteer.nation.null}",
            groups = {UacVolunteerAddValidator.class})
    private String nation;

    /**
     * 身份证号码
     */
    @NotNull(message = "{volunteer.id.card.null}",
            groups = {UacVolunteerAddValidator.class})
    @NotEmpty(message = "{volunteer.id.card.null}",
            groups = {UacVolunteerAddValidator.class})
    private String idCard;

    /**
     * 手机号
     */
    @NotNull(message = "{volunteer.mobile.no.null}",
            groups = {UacVolunteerAddValidator.class})
    @NotEmpty(message = "{volunteer.mobile.no.null}",
            groups = {UacVolunteerAddValidator.class})
    @Pattern(regexp = "^((\\+86)|(86))?(13|15|16|17|18|19)\\d{9}$",
            message = "{volunteer.phone.pattern}")
    private String mobileNo;

    /**
     * 学历
     */
    @NotNull(message = "{volunteer.education.null}",
            groups = {UacVolunteerAddValidator.class})
    @NotEmpty(message = "{volunteer.education.null}",
            groups = {UacVolunteerAddValidator.class})
    private String education;

    /**
     * 登录名
     */
    @NotNull(message = "{volunteer.login.name.null}",
            groups = {UacVolunteerAddValidator.class})
    @NotEmpty(message = "{volunteer.login.name.null}",
            groups = {UacVolunteerAddValidator.class})
    private String loginName;

    /**
     * 头像Id
     */
    @NotNull(message = "{volunteer.header.pic.null}",
            groups = {UacVolunteerAddValidator.class})
    private Long headerPic;

    /**
     * 职业类型
     */
    @NotNull(message = "{volunteer.job.type.null}",
            groups = {UacVolunteerAddValidator.class})
    @NotEmpty(message = "{volunteer.job.type.null}",
            groups = {UacVolunteerAddValidator.class})
    private String jobType;

    /**
     * 联系地址
     */
    private String address;

    /**
     * 服务技能
     */
    private String skill;

    /**
     * 服务时间
     */
    private String serviceTimes;

    /**
     * 所属区域
     */
    private String ownArea;

    /**
     * 服务区域
     */
    private String serviceArea;

    /**
     * 紧急联系人
     */
    private String egContact;

    /**
     * 紧急联系电话
     */
    @Pattern(regexp = "^((\\+86)|(86))?(13|15|16|17|18|19)\\d{9}$",
            message = "{volunteer.eg.phone.pattern}")
    private String egPhone;

    /**
     * 个人说明
     */
    private String remark;

    /**
     * 组织Id
     */
    private Long groupId;
}
